import iView from "iview";
import iviewArea from "iview-area";
import MixinPlugin from "./mixin.plugin";
import MethodPlugin from "./method.plugin";

const importPlugin = (Vue,i18n) => {
  //方便非vue实例外的使用
  window.i18n = i18n;
  //引入融合语言包的iView库
  Vue.use(iView, {
    i18n: (key, value) => i18n.t(key, value)
  });
  //引入全局方法
  Vue.use(MethodPlugin);
  //引入全局插件
  Vue.use(MixinPlugin);
  //省市区全局插件
  Vue.use(iviewArea);
  //引入拖拽指令
  //Vue.use(DraggableDirectivePlugin);
};

export default importPlugin;
